package org.tea.inventory.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author hanzy
 * @description 抽奖奖品类型
 * @date 2023年04月06日 14:03
 */
public enum PrizeTypeEnum {
    SKU("10", "商品"),
    INTEGRAL("20", "积分"),
    NULLPEIZE("30", "空奖"),
    ZJZL("40", "再接再厉"),
    ;

    @Getter
    @Setter
    private String code;
    @Getter
    @Setter
    private String content;


    PrizeTypeEnum(String code, String content) {
        this.code = code;
        this.content = content;
    }

    public static String getContentByName(String code) {
        for (PrizeTypeEnum prizeTypeEnum : PrizeTypeEnum.values()) {
            if (prizeTypeEnum.getCode().equals(code)) {
                return prizeTypeEnum.getContent();
            }
        }
        return "";
    }
}
